package cn.wolfcode.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.wolfcode.common.annotation.Excel;
import cn.wolfcode.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 拜访记录对象 bus_visit
 * 
 * @author dalang
 * @date 2023-11-05
 */
public class Visit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 回访客户id */
    private Long customerId;

    /** 回访客户 */
    @Excel(name = "回访客户")
    private String customerName;

    /** 回访方式 */
    @Excel(name = "回访方式")
    private String visitType;

    /** 回访日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "回访日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date visitTime;

    /** 回访原因 */
    @Excel(name = "回访原因")
    private String visitReason;

    /** 回访结果 */
    @Excel(name = "回访结果")
    private String visitResult;

    /** 录入人 */
    @Excel(name = "录入人")
    private String editName;

    /** 录入人id */
    private Long editId;

    /** 录入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date editTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    @NotNull(message = "回访客户不能为空")
    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setCustomerName(String customerName) 
    {
        this.customerName = customerName;
    }

    public String getCustomerName() 
    {
        return customerName;
    }
    public void setVisitType(String visitType) 
    {
        this.visitType = visitType;
    }

    @NotBlank(message = "回访方式不能为空")
    public String getVisitType() 
    {
        return visitType;
    }
    public void setVisitTime(Date visitTime) 
    {
        this.visitTime = visitTime;
    }

    @NotNull(message = "回访日期不能为空")
    public Date getVisitTime() 
    {
        return visitTime;
    }
    public void setVisitReason(String visitReason) 
    {
        this.visitReason = visitReason;
    }

    @NotBlank(message = "回访原因不能为空")
    public String getVisitReason() 
    {
        return visitReason;
    }
    public void setVisitResult(String visitResult) 
    {
        this.visitResult = visitResult;
    }

    public String getVisitResult() 
    {
        return visitResult;
    }
    public void setEditName(String editName) 
    {
        this.editName = editName;
    }

    public String getEditName() 
    {
        return editName;
    }
    public void setEditId(Long editId) 
    {
        this.editId = editId;
    }

    public Long getEditId() 
    {
        return editId;
    }
    public void setEditTime(Date editTime) 
    {
        this.editTime = editTime;
    }

    public Date getEditTime() 
    {
        return editTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerId", getCustomerId())
            .append("customerName", getCustomerName())
            .append("visitType", getVisitType())
            .append("visitTime", getVisitTime())
            .append("visitReason", getVisitReason())
            .append("visitResult", getVisitResult())
            .append("editName", getEditName())
            .append("editId", getEditId())
            .append("editTime", getEditTime())
            .toString();
    }
}
